Write a program that takes a string and prints out the number of each vowel found in the string.
% python vowel_counts.py 'Hello. How are you?'
{'a': 1', 'e': 2, 'i': 0, 'o': 3, 'u': 1}
vowel_counts.py
¶Write a program that polls the user for their homestate.
Print out a count of each state mentioned.
% python state_count.py
State: Utah
State: Idaho
State: New Jersey
State: Oregon
State: Utah
State:
{'Utah': 2, 'Idaho': 1, 'New Jersey': 1, 'Oregon': 1}
state_count.py
¶import string
string.punctuation
'!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
Write a program that takes a filename and counts the number of each individual word in that file.
Ignore case and punctuation.